<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Hero  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset="utf-8">
    <script src="js/jquery.min.js" defer></script>
    <script src="js/jazzy.js" defer></script>
    
    <script src="js/lunr.min.js" defer></script>
    <script src="js/typeahead.jquery.js" defer></script>
    <script src="js/jazzy.search.js" defer></script>
  </head>
  <body>


    <a title="Hero  Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="index.html">
          Hero 1.6.3 Docs
        </a>
         (24% documented)
      </p>
    
      <div class="header-col--secondary">
        <form role="search" action="search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </div>
    
        <p class="header-col header-col--secondary">
          <a class="header-link" href="https://github.com/HeroTransitions/Hero/">
            <img class="header-icon" src="img/gh.png" alt="GitHub"/>
            View on GitHub
          </a>
        </p>
    
        <p class="header-col header-col--secondary">
          <a class="header-link" href="dash-feed://https%3A%2F%2Fherotransitions.github.io%2FHero%2Fdocsets%2FHero.xml">
            <img class="header-icon" src="img/dash.png" alt="Dash"/>
            Install in Dash
          </a>
        </p>
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="index.html">Hero Reference</a>
      <img class="carat" src="img/carat.png" alt=""/>
      Hero  Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/BinaryOpNode.html">BinaryOpNode</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/CallNode.html">CallNode</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/ExprNode.html">ExprNode</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/FunctionNode.html">FunctionNode</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/Hero.html">Hero</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/HeroContext.html">HeroContext</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/HeroDebugPlugin.html">HeroDebugPlugin</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/HeroDebugPlugin.html">HeroDebugPlugin</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/HeroExtension.html">HeroExtension</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/HeroModifier.html">HeroModifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/HeroPlugin.html">HeroPlugin</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/HeroTransition.html">HeroTransition</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/Lexer.html">Lexer</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/NumberNode.html">NumberNode</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/Parser.html">Parser</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/PrototypeNode.html">PrototypeNode</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/VariableNode.html">VariableNode</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/CascadeDirection.html">CascadeDirection</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/HeroCoordinateSpace.html">HeroCoordinateSpace</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/HeroDefaultAnimationType.html">HeroDefaultAnimationType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/HeroDefaultAnimationType/Direction.html">– Direction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/HeroDefaultAnimationType/Strategy.html">– Strategy</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/HeroSnapshotType.html">HeroSnapshotType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/HeroTransitionState.html">HeroTransitionState</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/HeroViewOrderingStrategy.html">HeroViewOrderingStrategy</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/ParseError.html">ParseError</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/Token.html">Token</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/CAMediaTimingFunction.html">CAMediaTimingFunction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/CATransform3D.html">CATransform3D</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/HeroDebugView.html">HeroDebugView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/String.html">String</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UINavigationController.html">UINavigationController</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UINavigationController.html">UINavigationController</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UITabBarController.html">UITabBarController</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UIView.html">UIView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UIViewController.html">UIViewController</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Functions.html#/s:4Hero2eeoiySbAA8ExprNodeC_ADtF">==(_:_:)</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/HeroAnimator.html">HeroAnimator</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/HeroCompatible.html">HeroCompatible</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/HeroCustomSnapshotView.html">HeroCustomSnapshotView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/HeroPreprocessor.html">HeroPreprocessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/HeroProgressUpdateObserver.html">HeroProgressUpdateObserver</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/HeroStringConvertible.html">HeroStringConvertible</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/HeroTransitionDelegate.html">HeroTransitionDelegate</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/HeroViewControllerDelegate.html">HeroViewControllerDelegate</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/HeroConditionalContext.html">HeroConditionalContext</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/HeroTargetState.html">HeroTargetState</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content top-matter">
            
            <p><img src="https://cdn.rawgit.com/lkzhao/Hero/427d5f2/Resources/Hero.svg" width="388"/></p>

<p><strong>Hero</strong> is a library for building iOS view controller transitions. It provides a declarative layer on top of the UIKit&rsquo;s cumbersome transition APIs—making custom transitions an easy task for developers.</p>

<p><a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat" alt="Carthage compatible"></a>
<a href="https://github.com/JamitLabs/Accio"><img src="https://img.shields.io/badge/Accio-supported-0A7CF5.svg?style=flat" alt="Accio supported"></a>
<a href="https://codecov.io/gh/HeroTransitions/Hero"><img src="https://codecov.io/gh/HeroTransitions/Hero/branch/develop/graph/badge.svg" alt="codecov"></a>
<a href="http://cocoapods.org/pods/Hero"><img src="https://img.shields.io/cocoapods/v/Hero.svg?style=flat" alt="Version"></a>
<a href="https://github.com/lkzhao/Hero/blob/master/LICENSE?raw=true"><img src="https://img.shields.io/cocoapods/l/Hero.svg?style=flat" alt="License"></a>
<img src="https://img.shields.io/badge/Xcode-10.0%2B-blue.svg" alt="Xcode 10.0+">
<img src="https://img.shields.io/badge/iOS-10.0%2B-blue.svg" alt="iOS 10.0+">
<img src="https://img.shields.io/badge/Swift-4.0%2B-orange.svg" alt="Swift 4.0+">
<a href="https://github.com/lkzhao/Hero/blob/master/README.zh-cn.md"><img src="https://img.shields.io/badge/%E4%B8%AD%E6%96%87-README-blue.svg?style=flat" alt="中文 README"></a>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NT5F7Y2MPV7RE"><img src="https://img.shields.io/badge/Donate-PayPal-blue.svg" alt="Donate"></a></p>

<p><a href="https://github.com/HeroTransitions/Hero/actions/workflows/test.yml"><img src="https://github.com/HeroTransitions/Hero/actions/workflows/test.yml/badge.svg" alt="Unit Test"></a>
<a href="https://github.com/HeroTransitions/SwiftPMTest/actions/workflows/spm.yml"><img src="https://github.com/HeroTransitions/SwiftPMTest/actions/workflows/spm.yml/badge.svg" alt="Swift PM"></a></p>

<p><img src="https://cdn.rawgit.com/lkzhao/Hero/ebb3f2c/Resources/features.svg"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="https://cdn.rawgit.com/lkzhao/Hero/ebb3f2c/Resources/features2.svg"/></p>

<p>Hero is similar to Keynote&rsquo;s <strong>Magic Move</strong>. It checks the <code>heroID</code> property on all source and destination views. Every matched view pair is then automatically transitioned from its old state to its new state.</p>

<p>Hero can also construct animations for unmatched views. It is easy to define these animations via the <code>heroModifiers</code> property. Hero will run these animations alongside the <strong>Magic Move</strong> animations. All of these animations can be <strong>interactively controlled</strong> by user gestures.</p>

<p>At view controller level, Hero provides several template transitions that you can set through <code>heroModalAnimationType</code>, <code>heroNavigationAnimationType</code>, and <code>heroTabBarAnimationType</code>. These can be used as the foundation of your custom transitions. Combine with <code>heroID</code> &amp; <code>heroModifiers</code> to make your own unique transitions.</p>

<p><img src="https://cdn.rawgit.com/lkzhao/Hero/ebb3f2c/Resources/defaultAnimations.svg"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="https://cdn.rawgit.com/lkzhao/Hero/ebb3f2c/Resources/defaultAnimations2.svg"/></p>

<p>By default, Hero provides <strong>dynamic duration</strong> based on the <a href="https://material.io/design/motion/speed.html#easing">Material Design Motion Guide</a>. Duration is automatically determined by changes to distance and size—saving you the hassle, while providing consistent and delightful animations.</p>

<p>Hero doesn&rsquo;t make any assumptions about how the view is built or structured. It won&rsquo;t modify any of your views&rsquo; states other than hiding them during the animation. This makes it work with <strong>Auto Layout</strong>, <strong>programmatic layout</strong>, <strong>UICollectionView</strong> (without modifying its layout object), <strong>UITableView</strong>, <strong>UINavigationController</strong>, <strong>UITabBarController</strong>, etc&hellip;</p>
<h2 id='usage-example-1' class='heading'>Usage Example 1</h2>

<p><img src="https://cdn.rawgit.com/lkzhao/Hero/ebb3f2c/Resources/simple.svg" /></p>
<h3 id='view-controller-1' class='heading'>View Controller 1</h3>
<pre class="highlight swift"><code><span class="n">redView</span><span class="o">.</span><span class="n">hero</span><span class="o">.</span><span class="n">id</span> <span class="o">=</span> <span class="s">"ironMan"</span>
<span class="n">blackView</span><span class="o">.</span><span class="n">hero</span><span class="o">.</span><span class="n">id</span> <span class="o">=</span> <span class="s">"batMan"</span>
</code></pre>
<h3 id='view-controller-2' class='heading'>View Controller 2</h3>
<pre class="highlight swift"><code><span class="k">self</span><span class="o">.</span><span class="n">hero</span><span class="o">.</span><span class="n">isEnabled</span> <span class="o">=</span> <span class="kc">true</span>
<span class="n">redView</span><span class="o">.</span><span class="n">hero</span><span class="o">.</span><span class="n">id</span> <span class="o">=</span> <span class="s">"ironMan"</span>
<span class="n">blackView</span><span class="o">.</span><span class="n">hero</span><span class="o">.</span><span class="n">id</span> <span class="o">=</span> <span class="s">"batMan"</span>
<span class="n">whiteView</span><span class="o">.</span><span class="n">hero</span><span class="o">.</span><span class="n">modifiers</span> <span class="o">=</span> <span class="p">[</span><span class="o">.</span><span class="nf">translate</span><span class="p">(</span><span class="nv">y</span><span class="p">:</span><span class="mi">100</span><span class="p">)]</span>
</code></pre>
<h2 id='usage-example-2' class='heading'>Usage Example 2</h2>

<p><img src="https://cdn.rawgit.com/lkzhao/Hero/ebb3f2c/Resources/advanced.svg" /></p>
<h3 id='view-controller-1' class='heading'>View Controller 1</h3>
<pre class="highlight swift"><code><span class="n">greyView</span><span class="o">.</span><span class="n">hero</span><span class="o">.</span><span class="n">id</span> <span class="o">=</span> <span class="s">"skyWalker"</span>
</code></pre>
<h3 id='view-controller-2' class='heading'>View Controller 2</h3>
<pre class="highlight swift"><code><span class="k">self</span><span class="o">.</span><span class="n">hero</span><span class="o">.</span><span class="n">isEnabled</span> <span class="o">=</span> <span class="kc">true</span>
<span class="n">greyView</span><span class="o">.</span><span class="n">hero</span><span class="o">.</span><span class="n">id</span> <span class="o">=</span> <span class="s">"skyWalker"</span>

<span class="c1">// collectionView is the parent view of all red cells</span>
<span class="n">collectionView</span><span class="o">.</span><span class="n">hero</span><span class="o">.</span><span class="n">modifiers</span> <span class="o">=</span> <span class="p">[</span><span class="o">.</span><span class="n">cascade</span><span class="p">]</span>
<span class="k">for</span> <span class="n">cell</span> <span class="k">in</span> <span class="n">redCells</span> <span class="p">{</span>
    <span class="n">cell</span><span class="o">.</span><span class="n">hero</span><span class="o">.</span><span class="n">modifiers</span> <span class="o">=</span> <span class="p">[</span><span class="o">.</span><span class="n">fade</span><span class="p">,</span> <span class="o">.</span><span class="nf">scale</span><span class="p">(</span><span class="mf">0.5</span><span class="p">)]</span>
<span class="p">}</span>
</code></pre>

<p>You can do these in the <strong>storyboard</strong> too!</p>

<p><img src="https://cdn.rawgit.com/lkzhao/Hero/master/Resources/storyboardView.png" width="267px"/>
<img src="https://cdn.rawgit.com/lkzhao/Hero/master/Resources/storyboardViewController.png" width="267px"/></p>
<h2 id='installation' class='heading'>Installation</h2>
<h3 id='cocoapods' class='heading'>CocoaPods</h3>

<p>Add the following entry to your Podfile:</p>
<pre class="highlight ruby"><code><span class="n">pod</span> <span class="s1">'Hero'</span>
</code></pre>

<p>Then run <code>pod install</code>.</p>

<p>Don&rsquo;t forget to <code>import Hero</code> in every file you&rsquo;d like to use Hero.</p>
<h3 id='carthage' class='heading'>Carthage</h3>

<p>Add the following entry to your <code>Cartfile</code>:</p>
<pre class="highlight plaintext"><code>github "HeroTransitions/Hero"
</code></pre>

<p>Then run <code>carthage update</code>.</p>

<p>If this is your first time using Carthage in the project, you&rsquo;ll need to go through some additional steps as explained <a href="https://github.com/Carthage/Carthage#adding-frameworks-to-an-application">over at Carthage</a>.</p>
<h3 id='accio' class='heading'>Accio</h3>

<p>Add the following to your <code>Package.swift</code>:</p>
<pre class="highlight swift"><code><span class="o">.</span><span class="nf">package</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="s">"https://github.com/HeroTransitions/Hero.git"</span><span class="p">,</span> <span class="o">.</span><span class="nf">upToNextMajor</span><span class="p">(</span><span class="nv">from</span><span class="p">:</span> <span class="s">"1.4.0"</span><span class="p">)),</span>
</code></pre>

<p>Next, add <code><a href="Classes/Hero.html">Hero</a></code> to your App targets dependencies like so:</p>
<pre class="highlight swift"><code><span class="o">.</span><span class="nf">target</span><span class="p">(</span>
    <span class="nv">name</span><span class="p">:</span> <span class="s">"App"</span><span class="p">,</span>
    <span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span>
        <span class="s">"Hero"</span><span class="p">,</span>
    <span class="p">]</span>
<span class="p">),</span>
</code></pre>

<p>Then run <code>accio update</code>.</p>
<h3 id='swift-package-manager' class='heading'>Swift Package Manager</h3>

<p>To integrate using Apple&rsquo;s Swift package manager, add the following as a dependency to your <code>Package.swift</code>:</p>
<pre class="highlight swift"><code><span class="o">.</span><span class="nf">package</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="s">"https://github.com/HeroTransitions/Hero.git"</span><span class="p">,</span> <span class="o">.</span><span class="nf">upToNextMajor</span><span class="p">(</span><span class="nv">from</span><span class="p">:</span> <span class="s">"1.3.0"</span><span class="p">))</span>
</code></pre>

<p>and then specify <code>&quot;Hero&quot;</code> as a dependency of the Target in which you wish to use Hero.
Here&rsquo;s an example <code>PackageDescription</code>:</p>
<pre class="highlight swift"><code><span class="c1">// swift-tools-version:4.0</span>
<span class="kd">import</span> <span class="kt">PackageDescription</span>

<span class="k">let</span> <span class="nv">package</span> <span class="o">=</span> <span class="kt">Package</span><span class="p">(</span>
    <span class="nv">name</span><span class="p">:</span> <span class="s">"MyPackage"</span><span class="p">,</span>
    <span class="nv">products</span><span class="p">:</span> <span class="p">[</span>
        <span class="o">.</span><span class="nf">library</span><span class="p">(</span>
            <span class="nv">name</span><span class="p">:</span> <span class="s">"MyPackage"</span><span class="p">,</span>
            <span class="nv">targets</span><span class="p">:</span> <span class="p">[</span><span class="s">"MyPackage"</span><span class="p">]),</span>
    <span class="p">],</span>
    <span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span>
        <span class="o">.</span><span class="nf">package</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="s">"https://github.com/HeroTransitions/Hero.git"</span><span class="p">,</span> <span class="o">.</span><span class="nf">upToNextMajor</span><span class="p">(</span><span class="nv">from</span><span class="p">:</span> <span class="s">"1.6.3"</span><span class="p">))</span>
    <span class="p">],</span>
    <span class="nv">targets</span><span class="p">:</span> <span class="p">[</span>
        <span class="o">.</span><span class="nf">target</span><span class="p">(</span>
            <span class="nv">name</span><span class="p">:</span> <span class="s">"MyPackage"</span><span class="p">,</span>
            <span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span><span class="s">"Hero"</span><span class="p">])</span>
    <span class="p">]</span>
<span class="p">)</span>
</code></pre>
<h3 id='manually' class='heading'>Manually</h3>

<ul>
<li>Drag the <strong>Sources</strong> folder anywhere in your project.</li>
</ul>
<h2 id='documentations' class='heading'>Documentations</h2>

<p>Checkout the <strong><a href="https://github.com/lkzhao/Hero/wiki/Usage-Guide">WIKI PAGES (Usage Guide)</a></strong> for documentations.</p>

<p>For more up-to-date ones, please see the header-doc. (use <strong>alt+click</strong> in Xcode)
<img src="https://cdn.rawgit.com/lkzhao/Hero/master/Resources/headerDoc.png" width="521px"/></p>

<p>Dash compatible API docs: <a href="https://HeroTransitions.github.io/Hero/">https://HeroTransitions.github.io/Hero/</a></p>
<h2 id='interactive-transition-tutorials' class='heading'>Interactive Transition Tutorials</h2>

<p><a href="https://lkzhao.gitbooks.io/hero/content/docs/InteractiveTransition.html">Interactive transitions with Hero (Part 1)</a></p>
<h2 id='faq' class='heading'>FAQ</h2>
<h3 id='not-able-to-use-hero-transition-even-when-code-self-hero-isenabled-code-is-set-to-true' class='heading'>Not able to use Hero transition even when <code>self.hero.isEnabled</code> is set to true</h3>

<p>Make sure that you have also enabled <code>self.hero.isEnabled</code> on the navigation controller if you are doing a push/pop inside the navigation controller.</p>
<h3 id='views-being-covered-by-another-matched-view-during-the-transition' class='heading'>Views being covered by another matched view during the transition</h3>

<p>Matched views use global coordinate space while unmatched views use local coordinate space by default. Local coordinate spaced views might be covered by other global coordinate spaced views. To solve this, use the <code>useGlobalCoordinateSpace</code> modifier on the views being covered. Checkout <a href="https://github.com/lkzhao/Hero/wiki/Coordinate-Space">Coordinate Space Wiki page</a> for details.</p>
<h3 id='push-animation-is-shown-along-side-my-custom-animation' class='heading'>Push animation is shown along side my custom animation</h3>

<p>This is the default animation for navigation controller provided by Hero. To disable the push animation, set <code>self.hero.navigationAnimationType</code> to <code>.fade</code> or <code>.none</code> on the navigation controller.</p>
<h3 id='how-do-i-use-a-different-default-animation-when-dismissing' class='heading'>How do I use a different default animation when dismissing</h3>

<p>You can use the animation type <code>.selectBy(presenting:dismissing)</code> to specify a different default animation for dismiss.</p>

<p>For example:</p>
<pre class="highlight swift"><code>    <span class="k">self</span><span class="o">.</span><span class="n">hero</span><span class="o">.</span><span class="n">modalAnimationType</span> <span class="o">=</span> <span class="o">.</span><span class="nf">selectBy</span><span class="p">(</span><span class="nv">presenting</span><span class="p">:</span><span class="o">.</span><span class="n">zoom</span><span class="p">,</span> <span class="nv">dismissing</span><span class="p">:</span><span class="o">.</span><span class="n">zoomOut</span><span class="p">)</span>
</code></pre>
<h2 id='contribute' class='heading'>Contribute</h2>

<p>We welcome any contributions. Please read the <a href="https://github.com/lkzhao/Hero/wiki/Contribution-Guide">Contribution Guide</a>.</p>

          </div>
        </section>


      </article>
    </div>
    <section class="footer">
      <p>See <a class="link" href="https://github.com/HeroTransitions/Hero/blob/develop/LICENSE" target="_blank" rel="external noopener">license</a> for more details.</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
    </section>
  </body>
</html>
